package com.ansuenjob.jsonBuilder;

import org.json.JSONException;
import org.json.JSONObject;

import com.ansuenjob.model.Letter;
import com.ansuenjob.model.Resume;

public class LetterBuilder extends JSONBuilde {

	@Override
	public Letter buildJson(JSONObject jsonObject) throws JSONException {
		Letter letter = new Letter();
		int mid = jsonObject.getInt("mid");
		letter.setLetterId(mid);
		String letterName = jsonObject.getString("letterName");
		letter.setLetterName(letterName);
		String letterDesc = jsonObject.getString("letterDesc"); 
		letter.setLetterContent(letterDesc);
		return letter;
	}

}
